using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class ResetConfirmPanel : MonoBehaviour
{
    public Button m_BtnConfirm;
    public Button m_BtnCancel;

    public void Show(Action clickCallback)
    {
        gameObject.SetActive(true);
        m_ClickCallback = clickCallback;
    }

    public void Hide()
    {
        gameObject.SetActive(false);
    }

    //=========================================公私分界线==================================================

    private Action m_ClickCallback;

    void Awake()
    {
        m_BtnConfirm.onClick.AddListener(OnBtnConfirmClick);
        m_BtnCancel.onClick.AddListener(OnBtnCancelClick);
        gameObject.SetActive(false);
    }

    void OnBtnConfirmClick()
    {
        gameObject.SetActive(false);
        if (m_ClickCallback != null) m_ClickCallback();
    }

    void OnBtnCancelClick()
    {
        gameObject.SetActive(false);
    }


}
